package com.mzkj.wanjulaile.mobile.api.modules.brand.service;

import com.mzkj.wanjulaile.mobile.api.modules.brand.entity.Brand;
import com.mzkj.wanjulaile.mobile.api.modules.brand.mapper.BrandMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * 品牌管理Service
 *
 * @author ianly
 * @version 2016-10-09
 */
@Service
@Transactional(readOnly = true)
public class BrandServiceImpl  implements BrandService {

    @Autowired
    private BrandMapper brandMapper;

    public List<Brand> getHotBrand() {
        return getHotBrand(0);
    }

    public List<Brand> getHotBrand(int pageSize) {
        if (pageSize == 0 || pageSize > 100) {
            pageSize = 100;
        }
        return brandMapper.getHotBrand(pageSize);
    }

    public List<Brand> findListByCapital() {
        return brandMapper.findListByCapital();
    }

}